﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="uc_menu.ascx.cs" Inherits="menu_uc_menu" %>
<%@ Register Assembly="ESWebFramework.I18N" Namespace="ESWebFramework.I18N" TagPrefix="eswf" %>
<style>
._hand
{
    cursor:pointer;
}
</style>
<script>
    jQuery.extend(jQuery.expr[':'], {
        focus: function(element) {
            return element == document.activeElement;
        }
    });

    $(document).ready(function() {
    $("#top_menu a").click(menuHover, function() { });
    });
    function menuHover(obj) {
            $("#submenu div").each(function(i, val) {
                $(this).hide();
            });
            /*dailytransport
            profile
            home
            mem_company
            forum
            chat
            member_info
            advertising
            contact_admin
            */
            switch ($("#" + this.id).attr("link")) {
                case "profile":
                    $("#profile").show();
                    $("#top_menu li").removeAttr("class");
                    $("#" + this.id).parent().attr("class", "top_menu_li_active");
                    break;
                case "ctl00_uc_menu1_ESi18nHyperLink1":
                    $("#top_menu li").removeAttr("class");
                    $("#" + this.id).parent().attr("class", "top_menu_li_active");
                    break;
                default: break;
                case "dailytransport":
                    $("#daily_transport").show();
                    $("#top_menu li").removeAttr("class");
                    $("#" + this.id).parent().attr("class", "top_menu_li_active");
                    break;
                case "mem_company":
                    $("#member_comp").show();
                    $("#top_menu li").removeAttr("class");
                    $("#" + this.id).parent().attr("class", "top_menu_li_active");
                    break;
            }
        }
</script>
<div id="top_menu">
    <ul>
        <%if (filename == "" || filename.ToLower() == "default.aspx")
          { %>
        <li class="top_menu_li_active">
            <eswf:ESi18nHyperLink ID="ESi18nHyperLink17" NavigateUrl="~" link="home" TextReference="home" runat="server"></eswf:ESi18nHyperLink>
        </li>
        <%}
          else
          { %>
        <li>
            <eswf:ESi18nHyperLink ID="ESi18nHyperLink1" NavigateUrl="~" link="home" TextReference="home" runat="server"></eswf:ESi18nHyperLink>
        </li>
        <%} %>
        <%if (logged)
          { %>
          <%if (isAdmin1)
            { %>
        <li runat="server" id="li_profile" class="">
            <eswf:ESi18nHyperLink ID="ESi18nHyperLink18" TextReference="my_profile" link="profile" NavigateUrl="" CssClass="_hand" runat="server"></eswf:ESi18nHyperLink>
        </li>
        <%}
          } %>
        <li class="<%if (filename.ToLower() == "application.aspx" || filename.ToLower() == "applicationdetails.aspx") Response.Write("top_menu_li_active"); %>">
            <eswf:ESi18nHyperLink ID="ESi18nHyperLink3" TextReference="daily_transport_exch" link="dailytransport" NavigateUrl="~/Application.aspx" CssClass="_hand" runat="server"></eswf:ESi18nHyperLink>
        </li>
        
        <li class="<%if (filename.ToLower() == "favorites.aspx" | filename.ToLower() == "company.aspx") Response.Write("top_menu_li_active");%>">
            <eswf:ESi18nHyperLink ID="ESi18nHyperLink4" NavigateUrl="~/Company.aspx" CssClass="_hand" link="mem_company" TextReference="mem_company" runat="server"></eswf:ESi18nHyperLink>
        </li>  
        <%if (filename.ToLower() == "default.aspx")
          { %>
          
        <%} %>
        <li>
            <eswf:ESi18nHyperLink ID="ESi18nHyperLink5" NavigateUrl="~/forum" TextReference="forum" link="forum" runat="server"></eswf:ESi18nHyperLink>
        </li>
        <li>
            <eswf:ESi18nHyperLink ID="ESi18nHyperLink6" TextReference="chat" NavigateUrl="~/forum" link="chat" runat="server"></eswf:ESi18nHyperLink>
        </li>
          <li class="<%if (filename.ToLower() == "members-information") Response.Write("top_menu_li_active"); %>">
            <eswf:ESi18nHyperLink ID="ESi18nHyperLink22" TextReference="member_info" link="member_info" NavigateUrl="~/members-information" runat="server"></eswf:ESi18nHyperLink>
        </li>
          <li class="<%if (filename.ToLower() == "advertising") Response.Write("top_menu_li_active"); %>">
            <eswf:ESi18nHyperLink ID="ESi18nHyperLink21" TextReference="advertising" link="advertising" NavigateUrl="~/advertising" runat="server"></eswf:ESi18nHyperLink>
        </li>
          <li class="<%if (filename.ToLower() == "contact-administrator") Response.Write("top_menu_li_active"); %>">
            <eswf:ESi18nHyperLink ID="ESi18nHyperLink20" TextReference="contact_admin" link="contact_admin" NavigateUrl="~/contact-administrator" runat="server"></eswf:ESi18nHyperLink>
        </li>
    </ul>
</div>
<div id="submenu" class="top_header_tracker">
    <div id="profile" style="<%if (filename.ToLower() == "favorites.aspx" || profile) Response.Write("text-align:left"); else Response.Write("display:none;text-align:left"); %>">
        <eswf:ESi18nHyperLink ID="ESi18nHyperLink10" NavigateUrl="~/MyApplications.aspx" TextReference="my_apps" runat="server"></eswf:ESi18nHyperLink>
        <eswf:ESi18nHyperLink ID="ESi18nHyperLink11" NavigateUrl="javascript:CreateApplication()" TextReference="create_app" runat="server"></eswf:ESi18nHyperLink>
        <eswf:ESi18nHyperLink ID="ESi18nHyperLink12" NavigateUrl="~/Favorites.aspx" TextReference="fav_comp" runat="server"></eswf:ESi18nHyperLink>
        <eswf:ESi18nHyperLink ID="ESi18nHyperLink13" NavigateUrl="~/Favorites_App.aspx" TextReference="fav_offers" runat="server"></eswf:ESi18nHyperLink>
    </div>
  
     <div id="daily_transport" style="<%if (filename.ToLower() == "application.aspx") Response.Write("text-align:left"); else Response.Write("display:none; text-align:left"); %>">
     <%if (logged)
          { %>
        <eswf:ESi18nHyperLink ID="ESi18nHyperLink14" ForeColor="Red" NavigateUrl="javascript:CreateApplication()" TextReference="create_app" runat="server"></eswf:ESi18nHyperLink>
        <eswf:ESi18nHyperLink ID="ESi18nHyperLink25" ForeColor="Red" NavigateUrl="~/Favorites_App.aspx" TextReference="fav_offers" runat="server"></eswf:ESi18nHyperLink>
        <%} %>
        <eswf:ESi18nHyperLink ID="ESi18nHyperLink23" NavigateUrl="~/Application.aspx" TextReference="all_offers" runat="server"></eswf:ESi18nHyperLink>
        <asp:PlaceHolder ID="phAppLinks" runat="server"></asp:PlaceHolder>
    </div>
    <div id="member_comp" style="<%if (filename.ToLower() == "company.aspx") Response.Write("text-align:left"); else Response.Write("display:none;text-align:left");%>">
        <eswf:ESi18nHyperLink ID="ESi18nHyperLink15" NavigateUrl="~/Favorites.aspx" ForeColor="Red" TextReference="my_fav_comp" runat="server"></eswf:ESi18nHyperLink>
        <eswf:ESi18nHyperLink ID="ESi18nHyperLink16" NavigateUrl="~/Company.aspx" TextReference="all_comp" runat="server"></eswf:ESi18nHyperLink>
        <asp:PlaceHolder ID="phCompLinks" runat="server"></asp:PlaceHolder>      
    </div>
</div>